
package org.argeproje.resim.proc.math;

import javax.media.jai.JAI;
import javax.media.jai.PlanarImage;

import org.argeproje.resim.proc.ConnectionRule;
import org.argeproje.resim.proc.data.Data;
import org.argeproje.resim.proc.data.ImageDA;



public class PixelWiseMaxPR extends MathPR {
	protected void setConnectionRules(ConnectionRule connRule){
		connRule.addInType(ImageDA.class, 0);
		connRule.addInType(ImageDA.class, 1);
		connRule.addOutType(ImageDA.class);
	}
	public Data process() {
		PlanarImage in1 = getInputAsPlanarImage();
		PlanarImage in2 = getInputAsPlanarImage(1);
		PlanarImage outImage = JAI.create("max", in1, in2);
		ImageDA out = new ImageDA(outImage);
		setOutput(out);
		return getOutput();
	}

}
